projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
677bfe6
)
gridview: Compute right amount of items to skip
author
Benjamin Otte
<otte@redhat.com>
Sat, 20 Jun 2020 16:08:46 +0000
(12:08 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Sat, 20 Jun 2020 16:08:46 +0000
(12:08 -0400)
We only want to skip the remaining items in the current row, not since
the start of the widget.
gtk/gtkgridview.c
patch
|
blob
|
history
diff --git
a/gtk/gtkgridview.c
b/gtk/gtkgridview.c
index 5531b5c53c4436fb7bcb92ef266e139518605fc8..b9c2c9a87ce2bc45d4972f2d222626a02b8c3fcf 100644
(file)
--- a/
gtk/gtkgridview.c
+++ b/
gtk/gtkgridview.c
@@
-269,7
+269,8
@@
gtk_grid_view_get_cell_at_y (GtkGridView *self,
/* skip remaining items at end of row */
if (pos % self->n_columns)
{
- skip = pos - pos % self->n_columns;
+ skip = self->n_columns - pos % self->n_columns;
+ g_assert (n_items > skip);
n_items -= skip;
pos += skip;
}